"""Classe mere entite"""
class Entity (object) : 
    #rcvId = 1
    
    def __init__ (self):
        self.id = 0
        self.viewRadius = 4
        self.moveLen = 1
        self.shotRadius = 3
        self.shotSuccess = 0.2
        self.bulletAmount = 2.0
        #self.rcvId +=1
    def setBulletAmount(self, n):
        """Modifie le nombre de balles de l'entite"""
        self.bulletAmount = n
            
    def shotDone(self):
        """ Decremente le nombre de balles apres un coup de feu de ce policier """
        self.setBulletAmount(self.bulletAmount -1)
        
    def setId(self, n):
        self.id = n
        
    def getId(self):
        return self.id 
        
class Zombie (Entity):
    
    def __init__(self, n):
        Entity.__init__(self)
        self.contagionAmount = 0
        """self.contagionRadius = 3
        self.attackRadius = 1"""
        self.teamNumber = 0
        self.id = n
        
    def setTeamNumber(self, n):
        """Met a jour le numero d'equipe du zombie"""
        self.teamNumber = n


        
    """def setContagionAmount(self, n):
        Met a jour le nombre de contagions du zombie
        self.contagionAmount = n"""
                
    def contagionDone(self):   
        """ decremente le nombre de contagion apres une contamination tentee par ce zombie"""
        setContagionAmount(self, self.contagionAmount -1) 
            
        
class Human (Entity):
    
    def __init__ (self):
        Entity.__init__(self)
    
        
class Berzerk (Entity):
    
    def __init__ (self):
        Entity.__init__(self)
        self.berzerkDelay = 5
        self.berzerkRadius = 5

        
    def setBerzerkDelay(self, n):
        """Met a jour le delai d'explosion du berzerk"""
        self.berzerkDelay = n
            
    def berzerkDelayDown (self):
        """ decrementation du compte a rebours de ce berzerk en debut de tour"""
        self.setBerzerkDelay(self.berzerkDelay - 1 )   
